import {
    doExec
} from '@/api/request'

const apiPrefix = window.apiPrefix;

export const api = {
    // 系统管理员
    manage: {
        // 登录
        login(opts) {
            return doExec(`${apiPrefix}login`, opts);
        },
        out(opts) {
            return doExec(`${apiPrefix}out`, opts);
        }
    },
    // 工单
    ticket: {
        // 首页
        home: {
            eventNumAndRate(opts) {
                return doExec(`${apiPrefix}admin/eventNumAndRate`, opts, null, 'get');
            },
            acceptEvents(opts) {
                return doExec(`${apiPrefix}admin/acceptEvents`, opts, null, 'get');
            },
            eventState(opts) {
                return doExec(`${apiPrefix}admin/eventState`, opts, null, 'get');
            },
            eventRatio(opts) {
                return doExec(`${apiPrefix}admin/eventRatio`, opts, null, 'get');
            },
            timeAndBusyRatio(opts) {
                return doExec(`${apiPrefix}admin/timeAndBusyRatio`, opts, null, 'get');
            },

        },
        list: {
            selEvents(opts) {
                return doExec(`${apiPrefix}admin/selEvents`, opts, null, 'get');
            },
            newEvent(opts) {
                return doExec(`${apiPrefix}admin/newEvent`, opts);
            },
            selEventId(opts) {
                return doExec(`${apiPrefix}admin/selEventId`, opts, null, 'get');
            },
            conditionEvent(opts) {
                return doExec(`${apiPrefix}admin/conditionEvent`, opts);
            },
            selOrderDept(opts) {
                return doExec(`${apiPrefix}admin/selOrderDept`, opts, null, 'get');
            },
            selDutyPerson(opts) {
                return doExec(`${apiPrefix}admin/selDutyPerson`, opts, null, 'get');
            },
            eventDistribute(opts) {
                return doExec(`${apiPrefix}admin/eventDistribute`, opts);
            },
            eventMaterial(opts) {
                return doExec(`${apiPrefix}admin/eventMaterial`, opts);
            },
            eventDispose(opts) {
                return doExec(`${apiPrefix}admin/eventDispose`, opts);
            },
            eventReview(opts) {
                return doExec(`${apiPrefix}admin/eventReview`, opts);
            },
            eventCallback(opts) {
                return doExec(`${apiPrefix}admin/eventCallback`, opts);
            },
            eventWorkinfo(opts) {
                return doExec(`${apiPrefix}admin/eventWorkinfo`, opts);
            },
            selOrderArea(opts) {
                return doExec(`${apiPrefix}admin/selOrderArea`, opts, null, 'get');
            },
            selOrderType(opts) {
                return doExec(`${apiPrefix}admin/selOrderType`, opts, null, 'get');
            },
            selOrderSource(opts) {
                return doExec(`${apiPrefix}admin/selOrderSource`, opts, null, 'get');
            },
            selOrderlimit(opts) {
                return doExec(`${apiPrefix}admin/selOrderlimit`, opts, null, 'get');
            },
            selOrderStatus(opts) {
                return doExec(`${apiPrefix}admin/selOrderStatus`, opts, null, 'get');
            },
            selOrderlevel(opts) {
                return doExec(`${apiPrefix}admin/selOrderlevel`, opts, null, 'get');
            },
            selOrderAreaId(opts) {
                return doExec(`${apiPrefix}admin/selOrderAreaId`, opts, null, 'get');
            },
            editEvent(opts) {
                return doExec(`${apiPrefix}admin/editEvent`, opts);
            },
            selOrderReason(opts) {
                return doExec(`${apiPrefix}admin/selOrderReason`, opts, null, 'get');
            },

            back(opts) {
                return doExec(`${apiPrefix}admin/back`, opts);
            },
            delOrder(opts) {
                return doExec(`${apiPrefix}admin/delOrder`, opts);
            },
        }
    },
    tongji: {
        home: {
            eventPoint(opts) {
                return doExec(`${apiPrefix}admin/eventPoint`, opts, null, 'get');
            },
            everyDayEvent(opts) {
                return doExec(`${apiPrefix}admin/everyDayEvent`, opts, null, 'get');
            },
            everyMonthEvent(opts) {
                return doExec(`${apiPrefix}admin/everyMonthEvent`, opts, null, 'get');
            },
            areaSortRate(opts) {
                return doExec(`${apiPrefix}admin/areaSortRate`, opts, null, 'get');
            },
            timelinessRate(opts) {
                return doExec(`${apiPrefix}admin/timelinessRate`, opts, null, 'get');
            },
            everyDayEventOut(opts) {
                return doExec(`${apiPrefix}admin/everyDayEvent/excleOut`, opts, null, 'get');
            },
            everyMonthEventOut(opts) {
                return doExec(`${apiPrefix}admin/everyMonthEvent/excleOut`, opts, null, 'get');
            },
            areaSortRateOut(opts) {
                return doExec(`${apiPrefix}admin/areaSortRate/excleOut`, opts, null, 'get');
            },
            timelinessRateOut(opts) {
                return doExec(`${apiPrefix}admin/timelinessRate/excleOut`, opts, null, 'get');
            },
            everyPersonOrder(opts) {
                return doExec(`${apiPrefix}admin/everyPersonOrder`, opts, null, 'get');
            },
            materialOrder(opts) {
                return doExec(`${apiPrefix}admin/materialOrder`, opts, null, 'get');
            },
            overtimeEvent(opts) {
                return doExec(`${apiPrefix}admin/overtimeEvent`, opts, null, 'get');
            },
            newOrder(opts) {
                return doExec(`${apiPrefix}admin/everyPerson/newOrder`, opts, null, 'get');
            },
        }

    }
};